﻿@namespace SE.PO.CInterface.Web.Pages.DB.Signal
@using SE.PO.CInterface.Web.Clients
@using SE.PO.CInterface.Enums
@using SE.PO.CInterface.Web.Pages.DB.Components
@using System.ComponentModel.DataAnnotations
@inject SignalClient Client
@inject INotificationService Notice

<Form
    Model="@Model"
    Style="margin-top: 8px;"
    OnFinish="OnFinish"
    OnFinishFailed="OnFinishFailed"
    @ref="@Form">
    <Row Gutter="24">
        <GridCol Span="12">
            <FormItem Label="下级SCID" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
                <Input Style="width: 220px;" Disabled="true" Placeholder="SC编码，下级SCID" @bind-Value="@context.ScId"/>
            </FormItem>
        </GridCol>
        <GridCol Span="12">
            <FormItem Required Label="站点" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
                <Input  Style="width: 220px;" Disabled="true"  Placeholder="设备名称" @bind-Value="@context.SiteSiteName"/>
            </FormItem>
        </GridCol>
    </Row>

    <Row Gutter="24">
        <GridCol Span="12">
            <FormItem Label="设备名称" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
                <Input  Style="width: 220px;" Disabled="true"  Placeholder="设备名称" @bind-Value="@context.DeviceEquipment"/>
            </FormItem>
        </GridCol>
        <GridCol Span="12">
            <FormItem Label="数据类型" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
                <EnumSelect  Style="width: 220px;" TEnum="Enums.Type"  @bind-Value="@context.Type"/>
            </FormItem>
        </GridCol>
    </Row>

    <Row Gutter="24">
        <GridCol Span="12">
            <FormItem Label="信号名称" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
                <Input  Style="width: 220px;" Disabled="true"  Placeholder="信号名称" @bind-Value="@context.SignalName"/>
            </FormItem>
        </GridCol>
        <GridCol Span="12">
            <FormItem Label="告警等级" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
                <EnumSelect  Style="width: 220px;" Disabled="true"  TEnum="Enums.State?" @bind-Value="@context.AlarmLevel"/>
            </FormItem>
        </GridCol>
    </Row>

    <Row Gutter="24">
        <GridCol Span="12">
            <FormItem Label="存储周期" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
                <Input  Style="width: 220px;" Disabled="true"  Placeholder="存储周期" @bind-Value="@context.StoragePeriod"/>
            </FormItem>
        </GridCol>
        <GridCol Span="12">
            <FormItem Label="绝对阈值" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
                <Input  Style="width: 220px;" Disabled="true"  Placeholder="绝对阈值" @bind-Value="@context.AbsoluteVal"/>
            </FormItem>
        </GridCol>
    </Row>

    <Row Gutter="24">
        <GridCol Span="12">
            <FormItem Label="百分比阈值" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
                <Input  Style="width: 220px;" Disabled="true"  Placeholder="百分比阈值" @bind-Value="@context.RelativeVal"/>
            </FormItem>
        </GridCol>
        <GridCol Span="12">
            <FormItem Label="上限" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
                <Input  Style="width: 220px;" Disabled="true"  Placeholder="上限" @bind-Value="@context.HLimit"/>
            </FormItem>
        </GridCol>
    </Row>

    <Row Gutter="24">
        <GridCol Span="12">
            <FormItem Label="过高上限" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
                <Input  Style="width: 220px;" Disabled="true"  Placeholder="过高上限" @bind-Value="@context.SHLimit"/>
            </FormItem>
        </GridCol>
        <GridCol Span="12">
            <FormItem Label="LLimit" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
                <Input  Style="width: 220px;" Disabled="true"  Placeholder="LLimit" @bind-Value="@context.LLimit"/>
            </FormItem>
        </GridCol>
    </Row>

    <Row Gutter="24">
        <GridCol Span="12">
            <FormItem Label="过低上限" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
                <Input  Style="width: 220px;" Disabled="true"  Placeholder="过低上限" @bind-Value="@context.SLimit"/>
            </FormItem>
        </GridCol>
        <GridCol Span="12">
            <FormItem Label="描述信息" LabelCol="_formItemLayout.LabelCol" WrapperCol="_formItemLayout.WrapperCol">
                <Input  Style="width: 220px;" Disabled="true"  Placeholder="描述信息" @bind-Value="@context.Describe"/>
            </FormItem>
        </GridCol>
    </Row>
</Form>